Skip to content

Conversation

@jmoseley
Copy link
Contributor

Add lsp server config for dotnet.

@jmoseley jmoseley requested a review from a team as a code owner January 27, 2026 18:35
Copilot AI review requested due to automatic review settings January 27, 2026 18:35
@github-actions
Copy link

SDK Consistency Review

I've reviewed this PR for cross-SDK consistency.

Summary

No consistency issues found - This PR adds development tooling (LSP configuration) for the .NET SDK and does not modify any SDK client APIs or functionality.

Analysis

The changes add:

  1. .github/lsp.json - Centralized LSP server configuration with C# language server setup
  2. dotnet/dotnet-tools.json - .NET tool manifest for the csharp-ls language server

This is infrastructure/tooling for development environment support (IDE integration, code intelligence), not SDK client functionality.

Observation

The .github/lsp.json structure supports multiple language servers (it's a "lspServers" object), but currently only includes C#. While TypeScript, Python, and Go already have their native tooling:

  • TypeScript: Has tsconfig.json and TypeScript language server support via standard tooling
  • Python: Has pyproject.toml with Ruff and type checking configuration
  • Go: Has native gopls support through standard Go tooling

If the intent is to centralize LSP configuration for all SDKs in .github/lsp.json, you might consider adding entries for the other languages in a future PR. However, since each language ecosystem already has well-established LSP tooling, this may be unnecessary.

Conclusion

This PR maintains consistency - it's adding optional development tooling that doesn't impact SDK feature parity or public APIs.

AI generated by SDK Consistency Review Agent

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Language Server Protocol (LSP) configuration for the dotnet/C# SDK components of the repository. It configures the csharp-ls language server to provide IDE features like intellisense, go-to-definition, and other language services for C# files.

Changes:

  • Added dotnet tools manifest (dotnet/dotnet-tools.json) to declare csharp-ls as a project tool
  • Added LSP configuration (.github/lsp.json) to configure how csharp-ls should be invoked for C# files

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
dotnet/dotnet-tools.json Declares csharp-ls version 0.21.0 as a dotnet local tool for the project
.github/lsp.json Configures LSP server to use csharp-ls for .cs files with the GitHub.Copilot.SDK.sln solution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

.github/lsp.json Outdated
Comment on lines 5 to 9
"args": ["tool", "run", "csharp-ls", "--solution", "GitHub.Copilot.SDK.sln"],
"fileExtensions": {
".cs": "csharp"
},
"projectRootFiles": ["GitHub.Copilot.SDK.sln"]
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution file path is incorrect. The LSP configuration references "GitHub.Copilot.SDK.sln" but the actual file is located at "dotnet/GitHub.Copilot.SDK.sln". Since the LSP command will likely be executed from the repository root, the path should be "dotnet/GitHub.Copilot.SDK.sln". This affects both the "--solution" argument and the "projectRootFiles" array.

Suggested change
"args": ["tool", "run", "csharp-ls", "--solution", "GitHub.Copilot.SDK.sln"],
"fileExtensions": {
".cs": "csharp"
},
"projectRootFiles": ["GitHub.Copilot.SDK.sln"]
"args": ["tool", "run", "csharp-ls", "--solution", "dotnet/GitHub.Copilot.SDK.sln"],
"fileExtensions": {
".cs": "csharp"
},
"projectRootFiles": ["dotnet/GitHub.Copilot.SDK.sln"]

Copilot uses AI. Check for mistakes.
Comment on lines 5 to 11
"csharp-ls": {
"version": "0.21.0",
"commands": [
"csharp-ls"
],
"rollForward": false
}
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dotnet-tools.json manifest is missing the required "packageId" field for the csharp-ls tool. The packageId field specifies the NuGet package identifier and is required for dotnet to restore and run the tool correctly. Without this field, the tool installation will fail.

Copilot uses AI. Check for mistakes.
@jmoseley
Copy link
Contributor Author

Regarding the review comments:

Solution file path: The config uses rootPath: "dotnet" which tells the LSP tool to run from the dotnet/ subdirectory. So the paths in the config are relative to that - GitHub.Copilot.SDK.sln is correct.

packageId: For local tool manifests (dotnet-tools.json), the tool name key (csharp-ls) serves as the package identifier. The packageId field is only required when using dotnet tool install directly. This is valid dotnet-tools.json format.

rollForward: Fixed - removed the explicit false to allow default patch roll-forward behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants